<!-- doUserReg.php 用于将用户输入的注册信息添加到数据库。 -->
<?php
  
  require_once('dbConn.php');
  require_once('myFanc.php');
  //连接数据库		
  connect();

  /*if(!empty($_FILES["pic"]["name"])){
  	$pic = uploadfile('pic','./images/',array('jpg','gif','png'));
  }
  else{
  	$pic='';
  }*/

  $data = array(
    'zq_title' => ($_POST['zq_title']),
    'zq_pic' => ($_POST['zq_pic']),
    'zq_place' => ($_POST['zq_place']),
    'zq_intro' => ($_POST['zq_intro']),
    'zq_adddate' => ($_POST['zq_adddate']),
    'zq_hint' => ($_POST['zq_hint']),
  	);

  //执行SQL语句
	$result = add('flower',$data);

  if(!$result){
  	echo "添加失败！<br/>";
  	echo "<a href='addflower.html'>返回</a>";	  
  }else{	  
    redirect('flowerlist.php','添加成功！');
  }    
?>
